Undefined method `users' for nil:NilClass?

Assuming domain = Domain. Find(params:id) in the new method does what it should do.

Assuming @domain = Domain. Find(params:id) in the new method does what it should do: def new @domain = Domain. Find(params:id) @user = @domain.users.

Build @title = "Sign up" end def create @user = User. New(params:user) if @user. Save flash:success = "Welcome to My Space!" redirect_to @user else @title = "Sign up" render 'new' end end And your view should look like this: 20) %> 20) %> 20) %> 20) %> 20) %> Because of the hidden domain_id field in your form, the user will be assigned to the correct domain.

Thanks for the quick answer. Can you please suggest how will I retrieve the domain. – sandip Aug 20 at 13:03 @Sandip - I updated my answer.

Hope this helps. – Mischa Aug 20 at 14:23 thank you so much...I worked like magic. – sandip Aug 22 at 4:54 @Sandip - to show other users this question has been answered, you can click on the "V" mark next to the question.

– Mischa Aug 22 at 6:37.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions